package com.meiyue.bean.entity;

import javax.persistence.*;

/**
 * MeiyueJavaProject
 * com.meiyue.bean.entity
 * Created by Chris Chen
 * 2017/9/14
 * Explain:
 */
@Entity
@Table(name = "test_driver_service_places", schema = "test_yuedao", catalog = "")
public class TestDriverServicePlacesEntity {
    private int servicePlaceId;
    private int driverId;

    @Basic
    @Column(name = "service_place_id", nullable = false)
    public int getServicePlaceId() {
        return servicePlaceId;
    }

    public void setServicePlaceId(int servicePlaceId) {
        this.servicePlaceId = servicePlaceId;
    }

    @Basic
    @Column(name = "driver_id", nullable = false)
    public int getDriverId() {
        return driverId;
    }

    public void setDriverId(int driverId) {
        this.driverId = driverId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TestDriverServicePlacesEntity that = (TestDriverServicePlacesEntity) o;

        if (servicePlaceId != that.servicePlaceId) return false;
        if (driverId != that.driverId) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = servicePlaceId;
        result = 31 * result + driverId;
        return result;
    }

    private int id;

    @Id
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
